基址指针/基指针:在计算机系统与汇编语言中,指向当前栈帧(stack frame)基准位置的指针/寄存器,用于稳定地访问函数的局部变量、参数与保存的返回地址等。常见于 x86 架构中的 BP/EBP/RBP。(在某些场景下也可泛指“作为基准的指针”。)
/beɪs ˈpɔɪntər/
The base pointer helps the debugger show local variables correctly.
基址指针能帮助调试器正确显示局部变量。
When the function is called, the compiler may save the old base pointer and set a new base pointer to build a stack frame.
当函数被调用时,编译器可能会保存旧的基址指针,并设置新的基址指针来建立栈帧。
base 源自希腊语与拉丁语中表示“底部、基础”的词根(经由法语进入英语);pointer 来自 point(“指向/点”)加名词后缀 -er(“……的人/物”)。合起来在计算机语境中表示“指向作为基准位置的指针”,尤其指栈帧的基准指针。